<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>拉勾教育-第三阶段-模块一-第一题</title>
    <script>
        function checkusername() {
            var username = document.getElementById("username").value;
            if(username != 'admin'){
                alert('输入错误!');
            }
        }
        function getIntroduce() {
            var introduce = document.getElementById("introduce").value;
            alert(introduce);
            
        }
    </script>
</head>

<body>
    <form method="POST" id="reg" name="reg" action="">
        <table border="1" width="50%" align="center">
            <caption>注册用户信息</caption>
            <tr>
                <td>用户名:</td>
                <td>
                    <input type="text" name="username" id="username" onblur="checkusername()">
                </td>
            </tr>

            <tr>
                <td>密码:</td>
                <td><input type="password" name="password"></td>
            </tr>
            <tr>
                <td>性别:</td>
                <td>
                    <input type="radio" name="sex" value="男">男
                    <input type="radio" name="sex" value="女">女
                </td>
            </tr>
            <tr>
                <td>学历:</td>
                <td>
                    <select name="education">
                        <option>本科</option>
                        <option>专科</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>自我介绍:</td>
                <td><textarea id="introduce"></textarea></td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="button" value="提交" onclick="getIntroduce()">
                    <input type="reset" value="取消"></td>
            </tr>
        </table>
    </form>
</body>

</html>